<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  

  
  <title>Linux-环境配置 | Abel&#39;Blog</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="Centos centos 7防火墙 检查防火墙状态     ubuntu apt 相关知识   mysql 权限相关 备份数据库   cygwin多次grep没有输出 ubuntu无法更新 WSL 引用  记录一下Linux运维相关的学习资料； Centos安装完，可以直接将&#x2F;etc&#x2F;sysconfig&#x2F;network-scripts&#x2F;ifcfg-xxx此选项打开ONBOOT&#x3D;yes。这样一般">
<meta property="og:type" content="article">
<meta property="og:title" content="Linux-环境配置">
<meta property="og:url" content="http://example.com/2021/07/28/2020/2020-11-10-linux-env-init/index.html">
<meta property="og:site_name" content="Abel&#39;Blog">
<meta property="og:description" content="Centos centos 7防火墙 检查防火墙状态     ubuntu apt 相关知识   mysql 权限相关 备份数据库   cygwin多次grep没有输出 ubuntu无法更新 WSL 引用  记录一下Linux运维相关的学习资料； Centos安装完，可以直接将&#x2F;etc&#x2F;sysconfig&#x2F;network-scripts&#x2F;ifcfg-xxx此选项打开ONBOOT&#x3D;yes。这样一般">
<meta property="og:locale" content="en_US">
<meta property="article:published_time" content="2021-07-28T03:33:01.202Z">
<meta property="article:modified_time" content="2021-07-19T02:32:25.014Z">
<meta property="article:author" content="Abel Sean">
<meta property="article:tag" content="运维">
<meta property="article:tag" content="Linux">
<meta name="twitter:card" content="summary">
  
    <link rel="alternate" href="/atom.xml" title="Abel&#39;Blog" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  
<link rel="stylesheet" href="/css/style.css">

<meta name="generator" content="Hexo 5.4.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Abel&#39;Blog</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://example.com"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-2020/2020-11-10-linux-env-init" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2021/07/28/2020/2020-11-10-linux-env-init/" class="article-date">
  <time datetime="2021-07-28T03:33:01.202Z" itemprop="datePublished">2021-07-28</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      Linux-环境配置
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <ul>
<li><a href="#centos">Centos</a><ul>
<li><a href="#centos-7%E9%98%B2%E7%81%AB%E5%A2%99">centos 7防火墙</a><ul>
<li><a href="#%E6%A3%80%E6%9F%A5%E9%98%B2%E7%81%AB%E5%A2%99%E7%8A%B6%E6%80%81">检查防火墙状态</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#ubuntu">ubuntu</a><ul>
<li><a href="#apt-%E7%9B%B8%E5%85%B3%E7%9F%A5%E8%AF%86">apt 相关知识</a></li>
</ul>
</li>
<li><a href="#mysql">mysql</a><ul>
<li><a href="#%E6%9D%83%E9%99%90%E7%9B%B8%E5%85%B3">权限相关</a></li>
<li><a href="#%E5%A4%87%E4%BB%BD%E6%95%B0%E6%8D%AE%E5%BA%93">备份数据库</a></li>
</ul>
</li>
<li><a href="#cygwin%E5%A4%9A%E6%AC%A1grep%E6%B2%A1%E6%9C%89%E8%BE%93%E5%87%BA">cygwin多次grep没有输出</a></li>
<li><a href="#ubuntu%E6%97%A0%E6%B3%95%E6%9B%B4%E6%96%B0">ubuntu无法更新</a></li>
<li><a href="#wsl">WSL</a></li>
<li><a href="#%E5%BC%95%E7%94%A8">引用</a></li>
</ul>
<p>记录一下Linux运维相关的学习资料；</p>
<h1 id="Centos"><a href="#Centos" class="headerlink" title="Centos"></a>Centos</h1><p>安装完，可以直接将<code>/etc/sysconfig/network-scripts/ifcfg-xxx</code>此选项打开<code>ONBOOT=yes</code>。这样一般都能上网了。</p>
<p>EPEL (Extra Packages for Enterprise Linux)是基于Fedora的一个项目，为“红帽系”的操作系统提供额外的软件包，适用于RHEL、CentOS和Scientific Linux.如果不安装这个库，将会少了很多的软件包。<code>yum -y install epel-release</code></p>
<p>可以安装一下<code>zsh</code>，<code>autojump</code>，<code>autojump-zsh</code>，<code>oh-my-zsh</code>。自从2019年之后，<code>mac</code>就默认使用<code>zsh</code>代替了<code>bash</code>。</p>
<p><code>git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh</code></p>
<p>安装了<code>zsh</code>之后，可以通过执行<code>chsh</code>来设置成默认的shell。安装完成之后xshell工具的home键无法使用。可以通过在zshrc文件里面添加这些内容</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">bindkey</span> <span class="string">&#x27;\e[1~&#x27;</span> beginning-of-line</span><br><span class="line"><span class="built_in">bindkey</span> <span class="string">&#x27;\e[4~&#x27;</span> end-of-line</span><br></pre></td></tr></table></figure>

<p>参考文档<a target="_blank" rel="noopener" href="https://stackoverflow.com/questions/161676/home-end-keys-in-zsh-dont-work-with-putty">home-end-keys-in-zsh-dont-work-with-putty</a></p>
<p>有时候会升级失败，这个还是由于git访问不流畅造成。</p>
<ol>
<li>先将本地的oh my zsh目录找到，通过git pull直接拉取最新的版本；</li>
<li>执行这个指令 upgrade_oh_my_zsh 就能将版本升级好了。</li>
</ol>
<p>常用的软件：</p>
<figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br></pre></td><td class="code"><pre><span class="line">yum install -y wget git screen libtool automake</span><br><span class="line">yum install zlib-devel -y</span><br><span class="line">yum install centos-release-scl</span><br><span class="line">yum makecache</span><br><span class="line">yum install devtoolset-7-gcc-c++ -y</span><br><span class="line">yum install llvm-toolset-7 -y</span><br><span class="line">yum install cmake -y</span><br><span class="line">yum install python3-devel</span><br><span class="line"></span><br><span class="line"><span class="comment"># 安装man</span></span><br><span class="line">yum install man-pages man-db man</span><br><span class="line"></span><br><span class="line"><span class="comment"># c++ 帮助文件</span></span><br><span class="line">yum install man-pages libstdc++-docs</span><br><span class="line"></span><br><span class="line"><span class="comment"># 网路分析工具</span></span><br><span class="line">yum install tcpdump</span><br><span class="line"></span><br><span class="line"><span class="comment"># 安装gcc调试信息</span></span><br><span class="line">debuginfo-install gcc</span><br><span class="line"><span class="comment"># 最后能切换gcc版本：</span></span><br><span class="line">scl <span class="built_in">enable</span> llvm-toolset-7 devtoolset-7 bash</span><br><span class="line">curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py</span><br><span class="line">python get-pip.py</span><br><span class="line">pip install shadowsocks</span><br><span class="line">mariadb-libs</span><br><span class="line">mariadb-devel</span><br><span class="line">yum install mariadb-server</span><br><span class="line">systemctl start mariadb</span><br><span class="line">systemctl <span class="built_in">enable</span> mariadb</span><br><span class="line"></span><br><span class="line"><span class="comment"># 通过命令查看版本</span></span><br><span class="line">yum info cmake</span><br><span class="line"></span><br><span class="line"><span class="comment"># 切换脚本，如果不想用了，可以将这个从</span></span><br><span class="line">/etc/bashrc/profile</span><br><span class="line"><span class="comment"># 文件</span></span><br><span class="line"><span class="built_in">source</span> /opt/rh/llvm-toolset-7/<span class="built_in">enable</span></span><br><span class="line"><span class="built_in">source</span> /opt/rh/devtoolset-7/<span class="built_in">enable</span></span><br></pre></td></tr></table></figure>

<p>man帮助文件的章节意义</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">The section numbers of the manual pages are as follows:</span><br><span class="line"></span><br><span class="line">    1 – Executable programs or shell commands</span><br><span class="line">    2 – System calls (functions provided by the kernel)</span><br><span class="line">    3 – Library calls (functions within program libraries)</span><br><span class="line">    4 – Special files (usually found in /dev)</span><br><span class="line">    5 – File formats and conventions eg /etc/passwd</span><br><span class="line">    6 – Games</span><br><span class="line">    7 – Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7)</span><br><span class="line">    8 – System administration commands (usually only for root)</span><br><span class="line">    9 – Kernel routines [Non standard]</span><br></pre></td></tr></table></figure>

<h2 id="centos-7防火墙"><a href="#centos-7防火墙" class="headerlink" title="centos 7防火墙"></a>centos 7防火墙</h2><h3 id="检查防火墙状态"><a href="#检查防火墙状态" class="headerlink" title="检查防火墙状态"></a>检查防火墙状态</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">firewall-cmd --list-all</span><br><span class="line">firewall-cmd --state</span><br></pre></td></tr></table></figure>

<p>禁用随系统启动防火墙</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">systemctl disable firewalld</span><br></pre></td></tr></table></figure>

<p>启用随系统启动防火墙</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">systemctl enable firewalld</span><br></pre></td></tr></table></figure>

<p>关闭防火墙</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">systemctl stop firewalld</span><br></pre></td></tr></table></figure>

<p>当前防火墙服务状态</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">systemctl status firewalld</span><br></pre></td></tr></table></figure>

<p>永久开放防火墙端口</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">firewall-cmd --permanent --zone=public --add-port=52310-52320/tcp </span><br><span class="line">sudo firewall-cmd --zone=public --add-port=3000/tcp --permanent</span><br></pre></td></tr></table></figure>

<p>重新加载防火墙规则</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo firewall-cmd --reload</span><br></pre></td></tr></table></figure>

<p>netcat 尝试端口连接</p>
<p>使用tcp4方式连接一个ip地址的端口</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">nc -4 ip_address port</span><br><span class="line">nc --help</span><br><span class="line">See the ncat(1) manpage for full options, descriptions and usage examples</span><br><span class="line">man ncat</span><br><span class="line">Ncat 7.50 ( https://nmap.org/ncat )</span><br></pre></td></tr></table></figure>

<p>在帮助文件里面可以获取更多的信息。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">Connect to example.org on TCP port 8080.</span><br><span class="line">    ncat example.org 8080</span><br><span class="line"></span><br><span class="line">Listen for connections on TCP port 8080.</span><br><span class="line">    ncat -l 8080</span><br></pre></td></tr></table></figure>

<p>检查端口情况</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">netstat -tnlp</span><br><span class="line">``</span><br><span class="line"></span><br><span class="line">检查当前</span><br><span class="line"></span><br><span class="line"># Linux系统设置</span><br><span class="line"></span><br><span class="line"># 修改时区</span><br><span class="line"></span><br><span class="line">cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime</span><br><span class="line"></span><br><span class="line">locale设置</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>[root@vm10-0-2-2 raw_database]# locale<br>LANG=en_US.UTF-8<br>LC_CTYPE=”en_US.UTF-8”<br>LC_NUMERIC=”en_US.UTF-8”<br>LC_TIME=”en_US.UTF-8”<br>LC_COLLATE=”en_US.UTF-8”<br>LC_MONETARY=”en_US.UTF-8”<br>LC_MESSAGES=”en_US.UTF-8”<br>LC_PAPER=”en_US.UTF-8”<br>LC_NAME=”en_US.UTF-8”<br>LC_ADDRESS=”en_US.UTF-8”<br>LC_TELEPHONE=”en_US.UTF-8”<br>LC_MEASUREMENT=”en_US.UTF-8”<br>LC_IDENTIFICATION=”en_US.UTF-8”<br>LC_ALL=</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">如果发现有问题，可以通过在/etc/profile文件中添加</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>export LANG=”en_US.UTF-8”<br>export LC_ALL=”en_US.UTF-8”</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">## 检查coredump的配置</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>cat /proc/sys/kernel/core_pattern</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">一般我们将coredump文件生成目录重定向到一个固定的地方：</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>mkdir -p /data/cores/<br>chmod a+w /data/cores/ -R<br>echo “/home/cores/core-%e-%p-%t” &gt; /proc/sys/kernel/core_pattern</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">设置ulimit</span><br><span class="line"></span><br><span class="line">```bash</span><br><span class="line">ulimit -n 65535  </span><br><span class="line">ulimit -c unlimited</span><br><span class="line"></span><br><span class="line"># 直接修改这个文件，在这个文件尾部放入3行</span><br><span class="line">vi /etc/security/limits.conf</span><br><span class="line"></span><br><span class="line">* soft nofile 65535</span><br><span class="line">* hard nofile 65535</span><br><span class="line">* soft core unlimited</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<p>centos yum proxy</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">/etc/yum.conf</span><br><span class="line">proxy=http://代理服务器IP地址:端口号</span><br><span class="line">proxy=http://代理服务器IP地址:端口号</span><br><span class="line">proxy_username=代理服务器用户名</span><br><span class="line">proxy_password=代理服务器密码</span><br></pre></td></tr></table></figure>

<p>centos安装python3.6</p>
<p>softwarecollections.org</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 1. Install a package with repository for your system:</span></span><br><span class="line"><span class="comment"># On CentOS, install package centos-release-scl available in CentOS repository</span></span><br><span class="line"><span class="comment"># and enable the testing repository:</span></span><br><span class="line">$ sudo yum install centos-release-scl</span><br><span class="line">$ sudo yum-config-manager --<span class="built_in">enable</span> centos-sclo-rh-testing</span><br><span class="line"></span><br><span class="line"><span class="comment"># On RHEL, enable RHSCL and RHSCL-beta repositories for you system:</span></span><br><span class="line">$ sudo yum-config-manager --<span class="built_in">enable</span> rhel-server-rhscl-7-rpms</span><br><span class="line">$ sudo yum-config-manager --<span class="built_in">enable</span> rhel-server-rhscl-beta-7-rpms</span><br><span class="line"></span><br><span class="line"><span class="comment"># 2. Install the collection:</span></span><br><span class="line">$ sudo yum install rh-python36</span><br><span class="line"></span><br><span class="line"><span class="comment"># 3. Start using software collections:</span></span><br><span class="line">$ scl <span class="built_in">enable</span> rh-python36 bash</span><br></pre></td></tr></table></figure>

<h1 id="ubuntu"><a href="#ubuntu" class="headerlink" title="ubuntu"></a>ubuntu</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get update &amp;&amp; apt-get upgrade</span><br><span class="line">sudo apt-get install mariadb-server -y</span><br><span class="line">sudo apt-get install unzip -y</span><br><span class="line">sudo apt-get install zlib1g-dev -y</span><br><span class="line">sudo apt-get install libmariadbclient-dev -y</span><br><span class="line">sudo apt install p7zip-full -y</span><br><span class="line">sudo apt install -y <span class="string">&quot;screen&quot;</span></span><br><span class="line">sudo apt install clang-format -y</span><br><span class="line">sudo apt-get install gcc-7 g++-7 -y</span><br><span class="line">sudo apt-get install clang cmake unzip screen clang-format mariadb-server unzip golang python3-pip automake -y</span><br><span class="line">sudo apt-get install git libmariadbclient-dev p7zip-full openssl -y</span><br><span class="line">sudo apt-get install nodejs -y</span><br><span class="line">sudo apt-get install gdb -y</span><br><span class="line"></span><br><span class="line">apt update</span><br><span class="line">sudo apt update</span><br><span class="line">sudo apt upgrade</span><br><span class="line">sudo apt install build-essential -y</span><br><span class="line">sudo apt install ccache</span><br><span class="line">sudo apt install dos2unix</span><br><span class="line">apt -y install mariadb-server mariadb-client libmysqlclient-dev</span><br><span class="line">apt install libmysqlclient-dev</span><br><span class="line">apt install libcurl-dev</span><br><span class="line">apt install autoconf -y</span><br><span class="line">apt-get install manpages-dev glibc-doc libstdc++-10-doc</span><br><span class="line"></span><br><span class="line"><span class="comment"># libstdc++-10-doc This package contains documentation files for the GNU stdc++ library.</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># screen 无法使用的问题，其实就是重定向一下 screen 的工作目录就好了</span></span><br><span class="line">Cannot make directory <span class="string">&#x27;/run/screen&#x27;</span>: Permission denied</span><br><span class="line"><span class="built_in">export</span> SCREENDIR=<span class="variable">$HOME</span>/.screen</span><br><span class="line">abel@xiaozanbiao:~/learn/c++/octopus_svr/octopus_svr/build$ screen -S abel</span><br><span class="line">Directory /home/abel/.screen must have mode 700.</span><br><span class="line">abel@xiaozanbiao:~/learn/c++/octopus_svr/octopus_svr/build$ chmod 700 ~/.screen/</span><br><span class="line">abel@xiaozanbiao:~/learn/c++/octopus_svr/octopus_svr/build$ screen -S abel</span><br><span class="line"></span><br><span class="line"><span class="comment"># 2020/12/18 添加一个命令，记录当前某个进程的cpu，内存情况；</span></span><br><span class="line">sudo apt install sysstat</span><br><span class="line"></span><br><span class="line"><span class="comment">#!/bin/bash</span></span><br><span class="line">prog_name=<span class="string">&quot;your_programe_name&quot;</span></span><br><span class="line">prog_mem=$(pidstat  -r -u -h -C <span class="variable">$prog_name</span> |awk <span class="string">&#x27;NR==4&#123;print $12&#125;&#x27;</span>)</span><br><span class="line">time=$(date <span class="string">&quot;+%Y-%m-%d %H:%M:%S&quot;</span>)</span><br><span class="line"><span class="built_in">echo</span> <span class="variable">$time</span><span class="string">&quot;\tmemory(Byte)\t&quot;</span><span class="variable">$prog_mem</span> &gt;&gt;~/record/prog_mem.log</span><br><span class="line"></span><br><span class="line"><span class="comment"># 抓取某个进程的内存使用情况；</span></span><br><span class="line"><span class="comment"># 每2秒钟检测一次，持续5秒</span></span><br><span class="line">$ pidstat -r -u -h -C Level 2 5</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment"># CentOS7 如何升级Git</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 启用Wandisco GIT存储库，在此之前我们先写入新yum存储库配置文件，在终端输入：</span></span><br><span class="line">vim /etc/yum.repos.d/wandisco-git.repo</span><br><span class="line"></span><br><span class="line">[wandisco-git]</span><br><span class="line">name=Wandisco GIT Repository</span><br><span class="line">baseurl=http://opensource.wandisco.com/centos/7/git/<span class="variable">$basearch</span>/</span><br><span class="line">enabled=1</span><br><span class="line">gpgcheck=1</span><br><span class="line">gpgkey=http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco</span><br><span class="line"></span><br><span class="line"><span class="comment"># 导入存储库GPG密钥</span></span><br><span class="line">rpm --import http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment"># 安装：</span></span><br><span class="line"></span><br><span class="line">yum install git</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment"># 安装文档输出；</span></span><br><span class="line"></span><br><span class="line">sudo apt install graphviz</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h2 id="apt-相关知识"><a href="#apt-相关知识" class="headerlink" title="apt 相关知识"></a>apt 相关知识</h2><p><a target="_blank" rel="noopener" href="https://blog.csdn.net/yjk13703623757/article/details/78945576">使用apt-get查询安装指定版本的软件</a></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><span class="line">apt-cache show libjemalloc-dev</span><br><span class="line">Package: libjemalloc-dev</span><br><span class="line">Architecture: amd64</span><br><span class="line">Version: 5.2.1-1ubuntu1</span><br><span class="line">Priority: extra</span><br><span class="line">Section: universe/libdevel</span><br><span class="line">Source: jemalloc</span><br><span class="line">Origin: Ubuntu</span><br><span class="line">Maintainer: Ubuntu Developers &lt;ubuntu-devel-discuss@lists.ubuntu.com&gt;</span><br><span class="line">Original-Maintainer: Faidon Liambotis &lt;paravoid@debian.org&gt;</span><br><span class="line">Bugs: https://bugs.launchpad.net/ubuntu/+filebug</span><br><span class="line">Installed-Size: 2748</span><br><span class="line">Depends: libjemalloc2 (= 5.2.1-1ubuntu1)</span><br><span class="line">Suggests: binutils</span><br><span class="line">Filename: pool/universe/j/jemalloc/libjemalloc-dev_5.2.1-1ubuntu1_amd64.deb</span><br><span class="line">Size: 424588</span><br><span class="line">MD5sum: f519936da1e4557812ebad9cbf9e1029</span><br><span class="line">SHA1: 2e5e464c4c2f051b7f32ed44a805bd7f08ec3738</span><br><span class="line">SHA256: c5d64ba693ad45dd7c41f1d103a74816482601f7d0272ed49fc5441e9e1deb91</span><br><span class="line">Homepage: http://jemalloc.net/</span><br><span class="line">Description-en: development files and documentation <span class="keyword">for</span> jemalloc</span><br><span class="line"> Files used <span class="keyword">for</span> development with jemalloc. This package contains</span><br><span class="line"> headers and documentation.</span><br><span class="line"> .</span><br><span class="line"> jemalloc is a library providing a malloc(3) implementation <span class="keyword">for</span></span><br><span class="line"> multi-threaded processes on multi-processor systems.</span><br><span class="line">Description-md5: f91b42ea17991369b6b9cd46f2828e3f</span><br></pre></td></tr></table></figure>

<p>man 帮助文件安装</p>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/aiwangtingyun/article/details/79273802">Linux下完整安装 manpages</a></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get install linux-doc </span><br><span class="line">sudo apt-get install libcorelinux-dev</span><br><span class="line">sudo apt-get install libstdc++-7-dev </span><br><span class="line">sudo apt-get install libstdc++-7-doc </span><br><span class="line">sudo apt-get install manpages* </span><br></pre></td></tr></table></figure>

<h1 id="mysql"><a href="#mysql" class="headerlink" title="mysql"></a>mysql</h1><h2 id="权限相关"><a href="#权限相关" class="headerlink" title="权限相关"></a>权限相关</h2><p>安装完成之后，需要做一些简单的处理，防止安全问题。mysql最后限制访问的ip地址，给指定的ip地址开放访问的独立的密码。</p>
<figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">GRANT</span> <span class="keyword">ALL</span> PRIVILEGES <span class="keyword">ON</span> <span class="operator">*</span>.<span class="operator">*</span> <span class="keyword">TO</span> <span class="string">&#x27;root&#x27;</span>@<span class="string">&#x27;ip_address&#x27;</span> IDENTIFIED <span class="keyword">BY</span> <span class="string">&#x27;yourpassword&#x27;</span> <span class="keyword">WITH</span> <span class="keyword">GRANT</span> OPTION;</span><br><span class="line">FLUSH PRIVILEGES;</span><br></pre></td></tr></table></figure>

<p>使用这个命令将处理掉mysql的一些安全问题。</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ mysql_secure_installation</span><br></pre></td></tr></table></figure>

<p>mysql 8.0 版本 root 密码修改</p>
<p>需要执行</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">flush privileges;</span><br></pre></td></tr></table></figure>

<p>然后再执行</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">ALTER user <span class="string">&#x27;root&#x27;</span>@<span class="string">&#x27;localhost&#x27;</span> IDENTIFIED BY <span class="string">&#x27;root&#x27;</span>;--修改密码为root</span><br><span class="line">create user <span class="keyword">if</span> not exists <span class="string">&#x27;root&#x27;</span>@<span class="string">&#x27;%&#x27;</span> identified by <span class="string">&#x27;123456&#x27;</span>;</span><br><span class="line">GRANT ALL ON gamedata005.* TO <span class="string">&#x27;root&#x27;</span>@<span class="string">&#x27;%&#x27;</span>;</span><br></pre></td></tr></table></figure>

<p><a target="_blank" rel="noopener" href="https://dev.mysql.com/doc/refman/8.0/en/">MySQL8.0手册</a></p>
<h2 id="备份数据库"><a href="#备份数据库" class="headerlink" title="备份数据库"></a>备份数据库</h2><p>将某个数据库导出，不需要导出数据</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ mysqldump --no-create-db=TRUE --no-data=TRUE -h<span class="string">&quot;ip_address&quot;</span> -uroot -pyourpassword gamedb_10001 &gt; gamedb_10001.sql</span><br></pre></td></tr></table></figure>

<p>具体参数可以通过mysqldump –help中看到。</p>
<p>直接创建数据库</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">mysql -h<span class="string">&quot;ip_address&quot;</span> -uroot -pyourpassword -e <span class="string">&quot;create database gamedb_30001&quot;</span></span><br></pre></td></tr></table></figure>

<p>将数据表创建到新库中</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">mysql -h<span class="string">&quot;ip_address&quot;</span> -uroot -pyourpassword gamedb_30001 &lt; gamedb_10001.sql</span><br></pre></td></tr></table></figure>

<h1 id="cygwin多次grep没有输出"><a href="#cygwin多次grep没有输出" class="headerlink" title="cygwin多次grep没有输出"></a>cygwin多次grep没有输出</h1><p>在.bashrc文件里面增加这一句：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">alias</span> grep=<span class="string">&#x27;grep --color --line-buffer&#x27;</span>                     <span class="comment"># show differences in colour</span></span><br></pre></td></tr></table></figure>

<p>发现grep失效，无法做正确输出。google研究了一下，原因如下：</p>
<p>管道 | 是全缓冲的，一般来说buffer_size为4096，有些是8192。不管具体值多少，只有buffer_size满了，才会看到输出。</p>
<p>在操作里  &gt;&gt;file 这个操作也是全缓冲的。调整如下</p>
<p>tail -f log | grep –line-buffer xxx | grep –line-buffer yyy</p>
<p>结果输出正常。</p>
<p>grep当带上了 –line-buffer 的时候，每输出一行，就刷新一次。</p>
<p>在unix里，块设备和普通文件，以及管道都是全缓冲的。</p>
<h1 id="ubuntu无法更新"><a href="#ubuntu无法更新" class="headerlink" title="ubuntu无法更新"></a>ubuntu无法更新</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">The following packages have unmet dependencies</span><br></pre></td></tr></table></figure>

<p>后来我把阿里源换回Ubuntu原生的源就可以安装了，因为阿里源的包太新。<a target="_blank" rel="noopener" href="https://www.cnblogs.com/willaty/p/9522591.html">转载原文</a></p>
<h1 id="WSL"><a href="#WSL" class="headerlink" title="WSL"></a>WSL</h1><figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># WSL-Ubuntu18.04 LTS 重启方法</span></span><br><span class="line"><span class="comment"># 以管理员权限运行cmd</span></span><br><span class="line">&gt;net stop LxssManager	//停止</span><br><span class="line">&gt;net <span class="built_in">start</span> LxssManager	//启动</span><br><span class="line"></span><br><span class="line"><span class="comment"># 将WSL搬家</span></span><br><span class="line"><span class="comment"># 首先查看所有分发版本</span></span><br><span class="line">&gt; wsl <span class="literal">-l</span> -<span class="literal">-all</span>  <span class="literal">-v</span></span><br><span class="line"><span class="comment"># 导出分发版为tar文件到d盘</span></span><br><span class="line">&gt; wsl -<span class="literal">-export</span> Ubuntu<span class="literal">-20</span>.<span class="number">04</span> d:\ubuntu20.<span class="number">04</span>.tar</span><br><span class="line"><span class="comment"># 注销当前分发版</span></span><br><span class="line">&gt; wsl -<span class="literal">-unregister</span> Ubuntu<span class="literal">-20</span>.<span class="number">04</span></span><br><span class="line"><span class="comment"># 重新导入并安装分发版在d:\ubuntu</span></span><br><span class="line">wsl -<span class="literal">-import</span> Ubuntu<span class="literal">-20</span>.<span class="number">04</span> d:\ubuntu d:\ubuntu20.<span class="number">04</span>.tar -<span class="literal">-version</span> <span class="number">2</span></span><br><span class="line"><span class="comment"># 设置默认登陆用户为安装时用户名</span></span><br><span class="line">ubuntu2004 config -<span class="literal">-default</span><span class="literal">-user</span> Username</span><br><span class="line"><span class="comment"># 删除tar文件(可选)</span></span><br><span class="line"><span class="built_in">del</span> d:\ubuntu20.<span class="number">04</span>.tar</span><br><span class="line"><span class="comment"># 这个操作，完成之后我的WSL也从1升级到2了。</span></span><br><span class="line"><span class="comment"># 升级了之后，WSL完全拥有独立的ip地址；</span></span><br></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">Linux找出全部可执行文件，并且删除掉。</span><br><span class="line">ls -F|grep <span class="string">&#x27;*&#x27;</span> | sed <span class="string">&#x27;s#*##g&#x27;</span> | xargs rm</span><br><span class="line">参考网站： https://www.cnblogs.com/binyue/p/4707948.html</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<p><a target="_blank" rel="noopener" href="https://www.freesion.com/article/6352795169/">GPG生成</a></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">We need to generate a lot of random bytes</span><br><span class="line"><span class="comment"># 通过 yum install rng-tools完成安装。</span></span><br><span class="line"><span class="comment"># 之后再执行命令：rngd -r /dev/urandom，生成**就能瞬间完成了。</span></span><br></pre></td></tr></table></figure>


<h1 id="引用"><a href="#引用" class="headerlink" title="引用"></a>引用</h1><ul>
<li>[1] <a target="_blank" rel="noopener" href="https://www.cnblogs.com/mrbug/p/12030777.html">CentOS7 如何升级Git</a></li>
<li>[2] <a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_33797791/article/details/89593991">多次grep没有输出</a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://example.com/2021/07/28/2020/2020-11-10-linux-env-init/" data-id="ckrn3an72000n20xw5mx43wia" class="article-share-link">Share</a>
      
      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Linux/" rel="tag">Linux</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E8%BF%90%E7%BB%B4/" rel="tag">运维</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2021/07/28/2020/2020-11-12-bash/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          Linux-bash
        
      </div>
    </a>
  
  
    <a href="/2021/07/28/2020/2020-11-04-redis-%E4%B9%90%E8%A7%82%E9%94%81/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">redis-乐观锁</div>
    </a>
  
</nav>

  
</article>

</section>
        
          <aside id="sidebar">
  
    

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="/tags/3D/" rel="tag">3D</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/AI/" rel="tag">AI</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/C/" rel="tag">C++</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Game/" rel="tag">Game</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Go/" rel="tag">Go</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Linux/" rel="tag">Linux</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Math/" rel="tag">Math</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Server/" rel="tag">Server</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Unreal-Engine4/" rel="tag">Unreal Engine4</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/git/" rel="tag">git</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/golang/" rel="tag">golang</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/guitar/" rel="tag">guitar</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/node-js/" rel="tag">node.js</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/protobuf/" rel="tag">protobuf</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/python/" rel="tag">python</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/recast/" rel="tag">recast</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/redis/" rel="tag">redis</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/type/" rel="tag">type</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/vscode/" rel="tag">vscode</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E8%BF%90%E7%BB%B4/" rel="tag">运维</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/tags/3D/" style="font-size: 10px;">3D</a> <a href="/tags/AI/" style="font-size: 11.67px;">AI</a> <a href="/tags/C/" style="font-size: 15px;">C++</a> <a href="/tags/Game/" style="font-size: 18.33px;">Game</a> <a href="/tags/Go/" style="font-size: 13.33px;">Go</a> <a href="/tags/Linux/" style="font-size: 13.33px;">Linux</a> <a href="/tags/Math/" style="font-size: 11.67px;">Math</a> <a href="/tags/Server/" style="font-size: 16.67px;">Server</a> <a href="/tags/Unreal-Engine4/" style="font-size: 10px;">Unreal Engine4</a> <a href="/tags/git/" style="font-size: 10px;">git</a> <a href="/tags/golang/" style="font-size: 20px;">golang</a> <a href="/tags/guitar/" style="font-size: 10px;">guitar</a> <a href="/tags/node-js/" style="font-size: 10px;">node.js</a> <a href="/tags/protobuf/" style="font-size: 10px;">protobuf</a> <a href="/tags/python/" style="font-size: 10px;">python</a> <a href="/tags/recast/" style="font-size: 11.67px;">recast</a> <a href="/tags/redis/" style="font-size: 10px;">redis</a> <a href="/tags/type/" style="font-size: 10px;">type</a> <a href="/tags/vscode/" style="font-size: 10px;">vscode</a> <a href="/tags/%E8%BF%90%E7%BB%B4/" style="font-size: 16.67px;">运维</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/07/">July 2021</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2021/07/28/2021/2021-07-19-etcd-learn/">go-etcd阅读笔记</a>
          </li>
        
          <li>
            <a href="/2021/07/28/2021/2021-06-22-go-ethereum-learn/">go-ethereum阅读笔记</a>
          </li>
        
          <li>
            <a href="/2021/07/28/2021/2021-06-21-server%E6%B5%8B%E8%AF%95%E5%B7%A5%E5%85%B7/">server测试工具</a>
          </li>
        
          <li>
            <a href="/2021/07/28/2021/2021-06-09-pprof-doc/">go-pprof</a>
          </li>
        
          <li>
            <a href="/2021/07/28/2021/2021-04-19-c++-metaprogramming/">c++metaprogramming</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2021 Abel Sean<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css">

  
<script src="/fancybox/jquery.fancybox.pack.js"></script>




<script src="/js/script.js"></script>




  </div>
</body>
</html>